import req from '@/utils/request.ts';
import { LoginFormType, LoginResponseType, UserResponseType } from '@/types/userType';

enum API {
  LOGIN_URL = '/user/login',
  USERINFO_URL = '/user/info',
}

// 登录接口
export const reqLogin = (data: LoginFormType) =>
  req.post<any, LoginResponseType>(API.LOGIN_URL, data);

// 用户信息
export const reqUserInfo = () => req.get<any,UserResponseType>(API.USERINFO_URL);
